<?php
/** $Id: default_address.php 12387 2009-06-30 01:17:44Z ian $ */
defined( '_JEXEC' ) or die( 'Restricted access' );

if ( ( $this->contact->params->get( 'address_check' ) > 0 ) &&  ( $this->contact->address || $this->contact->suburb  || $this->contact->state || $this->contact->country || $this->contact->postcode ) ) :

if ( $this->contact->params->get( 'address_check' ) > 0 ) : ?>

		<br/><?php echo $this->contact->params->get( 'marker_address' );

endif;
if ( $this->contact->address && $this->contact->params->get( 'show_street_address' ) ) : ?>

		<?php echo nl2br($this->escape($this->contact->address));

endif;
if ( $this->contact->suburb && $this->contact->params->get( 'show_suburb' ) ) : ?>

		<br/><?php echo $this->escape($this->contact->suburb);

endif;
if ( $this->contact->state && $this->contact->params->get( 'show_state' ) ) : ?>

		<br/><?php echo $this->escape($this->contact->state);

endif;
if ( $this->contact->postcode && $this->contact->params->get( 'show_postcode' ) ) : ?>

		<br/><?php echo $this->escape($this->contact->postcode);

endif;
if ( $this->contact->country && $this->contact->params->get( 'show_country' ) ) : ?>

		<br/><?php echo $this->escape($this->contact->country);

endif;

endif;

if ( ($this->contact->email_to && $this->contact->params->get( 'show_email' )) || 
			($this->contact->telephone && $this->contact->params->get( 'show_telephone' )) || 
			($this->contact->fax && $this->contact->params->get( 'show_fax' )) || 
			($this->contact->mobile && $this->contact->params->get( 'show_mobile' )) || 
			($this->contact->webpage && $this->contact->params->get( 'show_webpage' )) ) : ?>

<?php if ( $this->contact->email_to && $this->contact->params->get( 'show_email' ) ) : ?>

		<br/><?php echo $this->contact->params->get( 'marker_email' );

		echo $this->contact->email_to;

endif;
if ( $this->contact->telephone && $this->contact->params->get( 'show_telephone' ) ) : ?>

		<br/><?php echo $this->contact->params->get( 'marker_telephone' );

		echo nl2br($this->escape($this->contact->telephone));

endif;
if ( $this->contact->fax && $this->contact->params->get( 'show_fax' ) ) : ?>

		<br/><?php echo $this->contact->params->get( 'marker_fax' );

		echo nl2br($this->escape($this->contact->fax));

endif;
if ( $this->contact->mobile && $this->contact->params->get( 'show_mobile' ) ) : ?>

		<br/><?php echo $this->contact->params->get( 'marker_mobile' );

		echo nl2br($this->escape($this->contact->mobile));

endif;
if ( $this->contact->webpage && $this->contact->params->get( 'show_webpage' )) : ?>

		<br/><a href="<?php echo $this->escape($this->contact->webpage); ?>" target="_blank">
		<?php echo $this->escape($this->contact->webpage); ?></a>

<?php endif;

endif;

if ( $this->contact->misc && $this->contact->params->get( 'show_misc' ) ) : ?>

		<?php echo $this->contact->params->get( 'marker_misc' );

		echo nl2br($this->contact->misc);

endif; ?>